package com.cims.bo.customer;

import com.cims.common.exception.BoException;
import com.cims.common.vo.Customer;
import com.cims.dao.customer.CustomerDAO;
import com.cims.dao.customer.CustomerDAOImpl;

public class CustomerBOImpl implements CustomerBO{

	CustomerDAO	dao	= new CustomerDAOImpl();

	@Override
	public boolean register(Customer customer) throws BoException{
		try{
			return dao.register(customer);
		}catch(Exception e){
		}
		return false;
	}

	@Override
	public boolean authenticateCustomer(String username, String password){
		try{
			return dao.authenticateCustomer(username, password);
		}catch(Exception ex){
			System.out.println(ex.getMessage());
			return false;
		}
	}

	@Override
	public Customer getCustomerDetail(String username){
		try{
			return dao.getCustomerDetail(username);
		}catch(Exception ex){
			return null;
		}
	}

}
